let app = getApp()
Component({
    properties: {
      browserData: {
        type: Array,
        observer: function(newVal, oldVal) {
          this.updateRate()
        }
      },requestData: {
        type:Object,
        observer: function(newVal, oldVal) {
          this.update()
        }
      }
      },
      data:{
        loginShow:false
      },
    lifetimes: {
        attached: function () {
 
         }
      },
    methods: {
      phone:function(){
        var phoneNumber=this.data.requestData.phone
        wx.showModal({
          title: '是否要拨打这个电话？',
          content:phoneNumber,
          showCancel: true, 
          cancelText:"取消",
          confirmText:"确定",
          confirmColor: '#3a82f8',
          success: function (res) {
            if (res.cancel) {
            } else{
              wx.makePhoneCall({
                phoneNumber:phoneNumber,
                success:function(){
                  wx.request({
                    url: app.globalData.siteroot,
                    data: {
                      do:'Video_updVideoTimes',
                      id:id,
                      staff_id:wx.getStorageSync('staff_bind_id'),
                      times_type:4,
                      user_id:wx.getStorageSync('user_id')
                    },
                    success: function(res) {
                      that.setData({
                        videoList:newlist
                     })
                    }
                  })
                 
                },
                fail:function(){
                  console.log('拨打失败')
                }
              })
            }
          }})
      },
      update:function(){
        var imgUrl=decodeURIComponent(this.data.requestData.imgUrl)
        this.setData({
          imgUrl:imgUrl
        })
      },
      updateRate:function(){}
    }
});
